import React, { Component, Suspense, lazy } from 'react';
import { withRouter, NavLink, Switch, Redirect, Route, BrowserRouter as Router } from 'react-router-dom';

const App =lazy(()=>import('./App'))
const Home =lazy(()=>import('./Home'))
class Bpp extends Component{
    render(){
        return (
        <Router>
            <Suspense fallback={<div> Loading... </div>}>
                <Switch>
                    <Route exact path='/' component={App}/>
                    <Route path='/home' component={Home}/>
                    <Redirect to='/'></Redirect>
                </Switch>
            </Suspense>
        </Router>
        )
    }
}
export default Bpp